<div class="admin">
    <div class="tab panel dux-box admin-panel">
        <div class="panel-head"><strong>商品分类</strong></div>
        <div class="padding border-bottom">
            <a href="{:U('index')}" class="button button-small border-green">管理</a>
            <a href="{:U('Member/add')}" class="button button-small border-green">编辑</a>
        </div>
        <div class="fixed-empty"></div>
        <form id="myform" method="post" action="{:U('save',array('cat_id'=>$c['cat_id']))}">
            <input type="hidden" name="form_submit" value="ok"/>
            <table class="table tb-type2">
                <tbody>
                    <tr>
                        <td class="required"><label class="validation" for="cta_name">分类名称:</label></td>
                        <td class="vatop rowform"><input type="text" value="{$c['cat_name']}" name="cat_name" id="cat_name" maxlength="20" class="input input_big"></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="omit_name">缩略分类名称:</label></td>
                        <td class="vatop rowform"><input type="text" value="{$c['omit_name']}" name="omit_name" id="omit_name" maxlength="20" class="input input_big"></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label for="pic">分类图片:</label></td>
                        <td class="vatop rowform">
                            <div class="goodspic-uplaod">
                                <!-- 图片上传按钮 -->
                                <input class="fileupload" type="file" name="pic" data-name="goods_images[]" data-num="5">
                                <!-- 图片展示模块 -->
                                <div class="files"></div>
                                <div style="clear:both;"></div>
                                <!-- 图片上传进度条模块 -->
                                <div class="up_progress"><div class="progress-bar"></div></div>
                            </div>
                        </td>
                        <td class="vatop tips">只有第一级分类可以上传图片，建议用16px * 16px，超出后自动隐藏</td>
                    </tr>


                    <tr>
                        <td class="required"><label class="validation">排序:</label></td>
                        <td class="vatop rowform"><input id="commis_rate" class="input input_big" type="text" value="{$c['sort_order']}" name="sort_order"></td>
                        <td class="vatop tips">必须为0-99的整数</td>
                    </tr>
                    <tr>
                        <td class="required"><label for="parent_id">上级分类:</label></td>
                        <td class="vatop rowform">
                            <select name="parent_id" id="parent_id" class="button bg">
                                <option value="0">默认选择顶级分类...</option>

                                <volist name="arr" id="v">
                                    <option value="{$v['cat_id']}" {$c['parent_id'] == $v['cat_id'] ? 'selected' : ''}>&nbsp;{$v["cat_name"]}</option>
                                    <volist name="v['_data']" id="v1">
                                        <option value="{$v1['cat_id']}" {$c['parent_id'] == $v1['cat_id'] ? 'selected' : ''}>&nbsp;&nbsp;├─ {$v1["cat_name"]}</option>
                                    </volist>
                                </volist>

                            </select></td>
                        <td class="vatop tips">如果选择上级分类，那么新增的分类则为被选择上级分类的子分类</td>
                    </tr>
                    <tr>
                        <td class="required"><label for="parent_id">属性:</label></td>
                        <td class="vatop rowform">
                            <select name="attri" id="attri" class="button bg">
                                <volist name="Attri" id="v">
                                    <option value="{$v['id']}" {$c['attri'] == $v['id'] ? 'selected' : ''}>&nbsp;{$v["title"]}</option>
                                </volist>
                            </select></td>
                        <td class="vatop tips">绑定属性</td>
                    </tr>
                    <tr>
                        <td class="required"><label for="parent_id">参数:</label></td>
                        <td class="vatop rowform">
                            <select name="para" id="para" class="button bg">
                                <volist name="Para" id="v">
                                    <option value="{$v['id']}" {$c['para'] == $v['id'] ? 'selected' : ''}>&nbsp;{$v["title"]}</option>
                                </volist>
                            </select></td>
                        <td class="vatop tips">绑定参数</td>
                    </tr>
                    <tr>
                        <td class="required"><label for="parent_id">品牌:</label></td>
                        <td class="vatop rowform">
                            <select name="brand" id="brand" class="button bg">
                                <volist name="Brand" id="v">
                                    <option value="{$v['id']}" {$c['brand'] == $v['id'] ? 'selected' : ''}>&nbsp;{$v["title"]}</option>
                                </volist>
                            </select></td>
                        <td class="vatop tips">绑定品牌</td>
                    </tr>
                    <tr>
                        <td class="required"><label for="gc_name">是否显示:</label></td>
                        <td id="gcategory">
                            <select name="is_show" class="button bg">
                                <option value="0" {$c['is_show'] == 0 ? 'selected' : ''}> 否</option>
                                <option value="1" {$c['is_show'] == 1 ? 'selected' : ''}> 是</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td class="required"><label for="show_in_nav">是否显示在导航栏:</label></td>
                        <td id="gcategory">
                            <select name="show_in_nav" class="button bg">
                                <option value="0" {$c['show_in_nav'] == 0 ? 'selected' : ''}> 否</option>
                                <option value="1" {$c['show_in_nav'] == 1 ? 'selected' : ''}> 是</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td class="required"><label>设置为首页推荐:</label></td>
                        <td class="vatop rowform">
                            <div class="form-group">
                                <div class="field">
                                    <div class="button-group radio">
                                        <label class="button">
                                            <input name="show_in_index" value="0" {$c['show_in_index'] == 0 ? 'checked' : ''} type="radio"><span class="icon icon-check"></span> 否
                                        </label>
                                        <label class="button">
                                            <input name="show_in_index" value="1" {$c['show_in_index'] == 1 ? 'checked' : ''} type="radio"><span class="icon icon-check"></span> 精品
                                        </label>
                                        <label class="button">
                                            <input name="show_in_index" value="2" {$c['show_in_index'] == 2 ? 'checked' : ''} type="radio"><span class="icon icon-check"></span> 最新
                                        </label>
                                        <label class="button">
                                            <input name="show_in_index" value="3" {$c['show_in_index'] == 3 ? 'checked' : ''} type="radio"><span class="icon icon-check"></span> 热门
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="keywords">关键字:</label></td>
                        <td class="vatop rowform"><input type="text" value="{$c[keywords]}" name="keywords" id="keywords" maxlength="20" class="input input_big"></td>
                        <td class="vatop tips"></td>
                    </tr>


                    <!--                            </tr>-->
                    <!--                            <tr>-->
                    <!--                                <td class="vatop rowform"><input type="hidden" name="type_name" id="type_name" value="{$v['type_name']}" />-->
                    <!--                                    <div id="type_div" class="goods-sort-type">-->
                    <!--                                        <div class="container">-->
                    <!--                                            <dl>-->
                    <!--                                                <dd>-->
                    <!--                                                    <input type="radio" name="type_id" value="0" checked="checked" />无类型 </dd>-->
                    <!--                                            </dl>-->
                    <!--                                            <dl>-->
                    <!---->
                    <!--                                                <volist name="data" id="v">-->
                    <!---->
                    <!--                                                    <input type="radio" name="type_id" value="{$v['type_id']}" />-->
                    <!--                                                    <span> {$v["type_name"]} </span><br/></dd>-->
                    <!---->
                    <!--                                                </volist>-->
                    <!---->
                    <!---->
                    <!--                                            </dl>-->
                    <!--                                        </div>-->
                    <!--                                    </div></td>-->
                    <!--                                <td class="vatop tips">如果当前下拉选项中没有适合的类型功能中添加新的类型</td>-->
                    <!--                            </tr>-->
                    <!--                            <tr>-->
                    <!--                                <td class="required"><label>排序:</label></td>-->
                    <!--                            </tr>-->
                    <!--                            <tr>-->
                    <!--                                <td class="vatop rowform"><input type="text" value="0" name="gc_sort" id="gc_sort" class="input input_big"></td>-->
                    <!--                                <td class="vatop tips">数字范围为0~255，数字越小越靠前</td>-->
                    <!--                            </tr>-->



                    <tr>
                        <td class="required">分类描述：</td>
                    </tr>
                    <tr>
                        <td class="required"><textarea name="cat_desc" class="input input_big">{$c['cat_desc']}</textarea></td>
                        <td class="vatop tips"></td>
                        <td class="vatop tips"></td>
                    </tr>
                </tbody>
                <tfoot>
                    <tr>
                        <td colspan="3"><input class="button bg-main" type="submit" value="提交"></td>
                    </tr>
                </tfoot>
            </table>
        </form>
    </div>
</div>
<!--<script type="text/javascript" src="http://www.shopnc.com/data/resource/js/common_select.js" charset="utf-8"></script>-->
<!--<script type="text/javascript" src="http://www.shopnc.com/data/resource/js/jquery.mousewheel.js"></script>-->
<script type="text/javascript">
    $('#myform').layer({
    });
</script>
<script src="__JS__/jquery.uploads.js" type="text/javascript" charset="utf-8"></script>
